import os


f = open('E:\\6.txt')
o = open('E:\\7.txt', 'w+')

lines = f.readlines()#读取全部内容
print(lines)
# lines[3]=lines[3].strip('\n')
# print(lines)
for i in range(len(lines)):
    # lines[i] = lines[i].strip('\n')
    # print(lines[i])
    if len(lines)-1>i:
        if ":" in lines[i+1]:
            lines[i] = lines[i].strip('\n')
            o.write(lines[i])
        else:
            o.write(lines[i])
    else:
        o.write(lines[i])




